<?php

namespace KGK\StoreBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * KGK\StoreBundle\Entity\Commande
 *
 * @ORM\Table(name="commande")
 * @ORM\Entity
 */
class Commande
{
    /**
     * @var integer $commId
     *
     * @ORM\Column(name="COMM_ID", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $commId;

    /**
     * @var datetime $commDate
     *
     * @ORM\Column(name="COMM_DATE", type="datetime", nullable=true)
     */
    private $commDate;

    /**
     * @var text $commEtat
     *
     * @ORM\Column(name="COMM_ETAT", type="text", nullable=true)
     */
    private $commEtat;

    /**
     * @var float $commPrix
     *
     * @ORM\Column(name="COMM_PRIX", type="float", nullable=true)
     */
    private $commPrix;

    /**
     * @var Produit
     *
     * @ORM\ManyToMany(targetEntity="Produit", inversedBy="comm")
     * @ORM\JoinTable(name="comm_contient_prod",
     *   joinColumns={
     *     @ORM\JoinColumn(name="COMM_ID", referencedColumnName="COMM_ID")
     *   },
     *   inverseJoinColumns={
     *     @ORM\JoinColumn(name="PROD_ID", referencedColumnName="PROD_ID")
     *   }
     * )
     */
    private $prod;

    /**
     * @var Utilisateur
     *
     * @ORM\ManyToOne(targetEntity="\KGK\UserBundle\Entity\User")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="USER_ID", referencedColumnName="id")
     * })
     */
    private $user;

    public function __construct()
    {
        $this->prod = new \Doctrine\Common\Collections\ArrayCollection();
    }
    

    /**
     * Get commId
     *
     * @return integer 
     */
    public function getCommId()
    {
        return $this->commId;
    }

    /**
     * Set commDate
     *
     * @param datetime $commDate
     */
    public function setCommDate($commDate)
    {
        $this->commDate = $commDate;
    }

    /**
     * Get commDate
     *
     * @return datetime 
     */
    public function getCommDate()
    {
        return $this->commDate;
    }

    /**
     * Set commEtat
     *
     * @param text $commEtat
     */
    public function setCommEtat($commEtat)
    {
        $this->commEtat = $commEtat;
    }

    /**
     * Get commEtat
     *
     * @return text 
     */
    public function getCommEtat()
    {
        return $this->commEtat;
    }

    /**
     * Set commPrix
     *
     * @param float $commPrix
     */
    public function setCommPrix($commPrix)
    {
        $this->commPrix = $commPrix;
    }

    /**
     * Get commPrix
     *
     * @return float 
     */
    public function getCommPrix()
    {
        return $this->commPrix;
    }

    /**
     * Add prod
     *
     * @param KGK\StoreBundle\Entity\Produit $prod
     */
    public function addProduit(\KGK\StoreBundle\Entity\Produit $prod)
    {
        $this->prod[] = $prod;
    }

    /**
     * Get prod
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getProd()
    {
        return $this->prod;
    }

    /**
     * Set user
     *
     * @param KGK\UserBundle\Entity\User $user
     */
    public function setUser(\KGK\UserBundle\Entity\User $user)
    {
        $this->user = $user;
    }

    /**
     * Get user
     *
     * @return KGK\UserBundle\Entity\User 
     */
    public function getUser()
    {
        return $this->user;
    }
}